#ifndef STACKMANAGEMENT_HPP
#define STACKMANAGEMENT_HPP

#include <QObject>
#include <QStack>
#include <QDebug>

#include "command.hpp"

/**
* @brief
*
* @class StackManagement stackmanagement.hpp "stackmanagement.hpp"
*/
class StackManagement : public QObject
{
Q_OBJECT

public:
    /**
    * @brief
    *
    * @fn StackManagement
    * @param parent
    */
    explicit StackManagement(QObject *parent = 0);

    StackManagement(const StackManagement &other);

    ~StackManagement();

    void push(int adress);

    int pop();

    void reset();

    const QStack<int> &getStack() const;
    int getStackPosition() const;

private:
    QStack<int> stack;
    int stackPosition;

signals:
    void stackOverflow();
    void pushStack(int adress, int level);
    void popStack();
};

#endif // STACKMANAGEMENT_HPP
